package org.example;

//javac -encoding UTF-8 HttpStatusEnum.java
//javap -p HttpStatusEnum.class
public enum HttpStatusEnum2 implements EnumInf{
    OK(200,"OK") {
        @Override
        public void show() {
            System.out.println("OK 展示");
        }
    },
    NOT_FOUND(404,"NOT_FOUND"){
        @Override
        public void show() {
            System.out.println("NOT_FOUND 展示");
        }
    };

    private final int code;
    private final String status;

    HttpStatusEnum2(int code, String status){
        this.code = code;
        this.status = status;
    }

    public int getCode() {
        return code;
    }

    public String getStatus() {
        return status;
    }

}
